if stats == nil then
	stats = {} -- Creates an array to let us beable to index itemFunctions when creating new functions
	stats.__index = stats
end
 
function stats:new() -- Creates the new class
	print('[stats] new started!')
	o = o or {}
	setmetatable( o, stats )
	return o
end
 
function stats:start() -- Runs whenever the itemFunctions.lua is ran
	print('[stats] stats started!')
end
 
function agi(keys) -- keys is the information sent by the ability
	local Unit = EntIndexToHScript( keys.caster_entindex ) -- EntIndexToHScript takes the keys.caster_entindex, which is the number assigned to the entity that ran the function from the ability, and finds the actual entity from it.
	Unit:ModifyAgility(1)
	StatsUpdated()
end

function str(keys) -- keys is the information sent by the ability
	local Unit = EntIndexToHScript( keys.caster_entindex ) -- EntIndexToHScript takes the keys.caster_entindex, which is the number assigned to the entity that ran the function from the ability, and finds the actual entity from it.
	Unit:ModifyStrength(1)
	StatsUpdated()
end

function int(keys) -- keys is the information sent by the ability
	local Unit = EntIndexToHScript( keys.caster_entindex ) -- EntIndexToHScript takes the keys.caster_entindex, which is the number assigned to the entity that ran the function from the ability, and finds the actual entity from it.
	Unit:ModifyIntellect(1)
	StatsUpdated()
end

function StatsUpdated()
	local heros = Entities:FindAllByClassname('npc_dota_hero_sven')
	for i=1,table.getn(heros) do
		local str = heros[i]:GetStrength()
		local agi = heros[i]:GetAgility()
		local int = heros[i]:GetIntellect()
		heros[i]:SetBaseDamageMax(12-str+str*0.1)
		heros[i]:SetBaseDamageMin(10-str+str*0.1)
		heros[i]:SetBaseManaRegen(0.1+0.1*int)
		heros[i]:SetBaseHealthRegen(0.01+str*0.05)
		heros[i]:SetBaseMoveSpeed(300+agi)
		heros[i]:SetBaseMagicalResistanceValue(25+0.15*int)
	end
end